﻿using System.Collections.ObjectModel;
using System.Windows.Media;
using Caliburn.Micro;
using ThunderboltHelper;
using ThunderboltInterfaceSharp.Views;
using ThunderboltInterfaceSharp.Views.UserControls.Download;

namespace ThunderboltInterfaceSharp.ViewModels.UserControls.Download;

public class AddDownloadCommandViewModel : Screen
{
	public string SelectedPath { get; set; }
	public string LinkedText { get; set; } = "添加多个下载链接时，请确保每行只有一个链接。";
	private AddDownloadCommandView _addDownloadCommandView;

	public ObservableCollection<string> HistoricalRecord { get; set; }

	public AddDownloadCommandViewModel()
	{
		HistoricalRecord = new ObservableCollection<string>()
		{
			"F:/DownLoad",
			"E:/DownLoad",
			"D:/DownLoad"

		};
	}
	protected override void OnViewLoaded(object view)
	{
		_addDownloadCommandView = (AddDownloadCommandView)view;
	}

	public void BtnClose()
	{
		_addDownloadCommandView.Close();
	}

	public void BtnOpenFile()
	{
		var a = string.Empty;
		HistoricalRecord.Add(a.GetFolderBrowserDialogSelectedPath()); 
	}
}